/*
 * LogDatabase.h
 *      Author: DePhille
 */

#ifndef LOGDATABASE_H_
#define LOGDATABASE_H_

#include "Log.h"

GNode pc_logDatabase;

sqlite3* pc_logDB;

#define PC_LOGDB_QUERY_GETTABLENAME "SELECT * FROM Accounts WHERE protocol=? AND account=? LIMIT 1;"

static void		PC_LogDB_Init(void);
static void		PC_LogDB_Uninit(void);
static void		PC_LogDB_Open(void);
static void 	PC_LogDB_Close(void);

static gboolean PC_LogDB_Query(const gchar* query);
static gchar*	PC_LogDB_GetTableName(const gchar* protocol, const gchar* account);
static gboolean	PC_LogDB_TableExists(const gchar* tableName);


#endif /* LOGDATABASE_H_ */
